Arduino Programming for Beginners : Getting started with Sketches Guide by Bales Simone

Arduino Programming for Beginners : Getting started with Sketches Guide by Bales Simone

Author:Bales, Simone [Bales, Simone]
Language: eng
Format: epub
Published: 2018-10-20T16:00:00+00:00


If …else statement

An if statement can be followed by an optional else statement, which executes when the expression is false.

// syntax for If …else statement

if (condition)

{

do something;

} else

{

do something;

}

switch case statement

Similar to the if statements, switch...case controls the flow of programs by allowing the programmers to specify different codes that should be executed in various conditions

// syntax for switch case statementswitch (variable)

{ case label: { // statements

break; }

case labe2: {

// statements

break; }

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.